package com.framework;


import org.junit.Test;
import org.springframework.cache.ehcache.EhCacheCacheManager;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import com.framework.model.User;
import com.framework.service.UserService;

public class TestUser {
    @Test
    public void userServiceTest(){
        ApplicationContext context = new ClassPathXmlApplicationContext("applicationContext.xml");
        UserService userService = (UserService)context.getBean("userService");
        User user = userService.getUser("张四");
        System.out.println(user);
        EhCacheCacheManager manager = (EhCacheCacheManager)context.getBean("cacheManager");
        System.out.println(manager);
    }
}